using System;
using EPiServer.Community.Moblog;

namespace EPiAbstractions.Community.Moblog
{
    public class MoblogHandlerFacade : IMoblogHandlerFacade
    {
        private static MoblogHandlerFacade _instance;

        public static MoblogHandlerFacade Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new MoblogHandlerFacade();

                return _instance;
            }

            set { _instance = value; }
        }

        #region IMoblogHandlerFacade Members

        public virtual IMessageDestinationFilter MatchFilter(IMessage message)
        {
            return MoblogHandler.MatchFilter(message);
        }

        public virtual DestinationFilterCollection GetDestinationFilters(Type filterType)
        {
            return MoblogHandler.GetDestinationFilters(filterType);
        }

        public virtual IMessageDestinationFilter GetDestinationFilter(Int32 id)
        {
            return MoblogHandler.GetDestinationFilter(id);
        }

        public virtual IMessageDestinationFilter AddDestinationFilter(IMessageDestinationFilter filter)
        {
            return MoblogHandler.AddDestinationFilter(filter);
        }

        public virtual void UpdateDestinationFilter(IMessageDestinationFilter filter)
        {
            MoblogHandler.UpdateDestinationFilter(filter);
        }

        public virtual void RemoveDestinationFilter(IMessageDestinationFilter filter)
        {
            MoblogHandler.RemoveDestinationFilter(filter);
        }

        public virtual void Send(IMessage message)
        {
            MoblogHandler.Send(message);
        }

        public virtual IMessage GetMessage(Int32 id)
        {
            return MoblogHandler.GetMessage(id);
        }

        public virtual void RemoveMessage(IMessage message)
        {
            MoblogHandler.RemoveMessage(message);
        }

        #endregion
    }
}